<?php

namespace App\Providers;

use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
    	/******自定义一个表单验证*******/
	    /*Validator::extend('parentCategory', function ($attribute, $value, $parameters, $validator) {
		    dd($parameters);
	    });**/
	    //验证分类的父级是否选择了子类
	    //Validator::extend('parentCategory', 'App\Tool\CustomValidate@checkParentCategory');
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
